package com.weme.home.viewmode

import com.google.common.util.concurrent.RateLimiter
import com.weme.common.base.BaseViewModel
import com.weme.common.network.NetWorkUrl
import com.weme.common.util.canCallAgain
import dev.kratos.api.im_server.v1.CallVideoRequest
import dev.kratos.api.user_server.v1.GetOnlineListRequst

class HomeNewViewMode : BaseViewModel() {
    fun getOnlineList(pageIndex :Int) {
        if (canCallAgain(1000)) {
            sendNetworkRequest(
                GetOnlineListRequst.newBuilder().setPage(pageIndex).setLimit(10).setGender(2)
                    .build().toByteArray(),
                NetWorkUrl.OnlineNewList
            )
        }
    }

}